import { createRouter, createWebHistory } from 'vue-router';
import Login from '@/views/UserLogin.vue';
import Register from '@/views/UserRegister.vue';
import MainPage from '@/views/MainPage.vue';
import UserProfile from "@/views/UserProfile.vue";
import AdminPage from "@/views/AdminPage.vue";
import AdminLogin from "@/views/AdminLogin.vue";
import RewordExchange from "@/views/RewardExchange.vue";

const routes = [
    { path: '/', redirect: '/login' },
    { path: '/register', component: Register },
    { path: '/login', component: Login },
    { path: '/mainPage', component: MainPage },
    { path: '/userProfile', component: UserProfile },
    { path: '/admin', component: AdminPage },
    { path: '/adminLogin', component: AdminLogin },
    { path: '/rewordExchange', component: RewordExchange },
]

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;
